<!--
  Generated template for the ChecksModalPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>
  <ion-navbar color="secondary">
    <ion-title><span class="custom-font-size-t">Controles de calidad</span></ion-title>
    <ion-buttons end>
        <button ion-button (click)="closeModal()">
            <span class="custom-font-size-t">Atrás</span>
        </button>
    </ion-buttons>
  </ion-navbar>
</ion-header>


<ion-content padding>
    <ion-item [hidden]='quality_checks.length>0' color ="danger">No hay controles de calidad</ion-item>
    <ion-list>
        <ion-item *ngFor="let qc of quality_checks">
            <ion-label stacked><span>{{ qc.name }}</span></ion-label>
            <ion-select interface="popover" *ngIf="qc['value_type'] == 'check'" [(ngModel)]="qc['value']">
                <ion-option value="OK"><span>OK</span></ion-option> 
                <ion-option value="NO OK"><span>NO OK</span></ion-option> 
            </ion-select>    
            <ion-input *ngIf="qc['value_type'] == 'numeric'" type="number" [(ngModel)]="qc['value']"></ion-input>
            <ion-input *ngIf="qc['value_type'] == 'text'" type="text" [(ngModel)]="qc['value']"></ion-input>
        </ion-item>  
    </ion-list>
     <button ion-button block (click)="confirmModal()">Confirmar</button>
</ion-content>
